package com.itbac.domain;

import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * 用户表
 *
 insert into `shop_user` value(null ,'admin','123456789','zhangsan');
 insert into `shop_user` value(null ,'admin','123456788','lisi');
 insert into `shop_user` value(null ,'admin','123456787','wangwu');
 */

//实体类跟数据库表的对应关系
@Entity(name = "shop_user")
//自动get,set方法
@Data
public class User {
    //主键
    @Id
    //数据库自增涨
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer uid;
    //用户名
    private String username;
    //密码
    private String password;
    //手机号
    private String telephone;
}
